feat(plugins): add Vercel MCP plugin#1424
Conversation
Closes MoonshotAI#1016 The LLM sometimes passes 'completed' as the status for TodoList items, but the schema only accepted 'pending' | 'in_progress' | 'done'. This produced two problems: 1. Validation failed when the model used 'completed'. 2. Even if validation passed, statusMarker() had no case for 'completed' and fell through to the unreachable default branch. Changes: - Extend TodoStatus union to include 'completed' so it is accepted at the type level. - Map 'completed' -> 'done' in setTodos() so persisted state stays clean. - Handle 'completed' in statusMarker() so it renders as '[done]'. - Update the markdown description to explicitly warn against using 'completed'. - Add a test confirming 'completed' is accepted and mapped to 'done'.
Introduces kimi-vercel, an official MCP plugin for managing Vercel projects and deployments. - MCP server (stdio transport) with 4 tools: - vercel_list_projects: list all projects - vercel_get_project: get project details - vercel_list_deployments: list deployments - vercel_get_deployment: get deployment by ID or URL - Requires VERCEL_TOKEN environment variable - Added to official marketplace
commit: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 458d24d33e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
|
||
| function send(message) { | ||
| const json = JSON.stringify(message); | ||
| process.stdout.write(`Content-Length: ${Buffer.byteLength(json)}\r\n\r\n${json}`); |
There was a problem hiding this comment.
Use JSON-line framing for MCP responses
With Kimi Code's stdio MCP transport, stdout must be one JSON-RPC message per line (the bundled kimi-datasource server does this, and the MCP 2025-06-18 stdio spec says messages are newline-delimited). This writes a Content-Length header plus a body with no trailing newline, so the client parses the header as a non-JSON message or waits forever and the kimi-vercel server never completes initialize/tools/list; emit ${json}\n without headers instead.
Useful? React with 👍 / 👎.
| if (id.includes('.vercel.app') || id.startsWith('http')) { | ||
| // URL-based lookup | ||
| const url = id.startsWith('http') ? id : `https://${id}`; | ||
| path = `/v13/deployments/get?url=${encodeURIComponent(url)}`; |
There was a problem hiding this comment.
Use the documented deployment URL path
For the documented URL input case such as my-project-xxx.vercel.app, this calls /v13/deployments/get?url=..., but Vercel's current REST endpoint for ID-or-URL lookup is GET /v13/deployments/{idOrUrl} with the deployment ID or hostname in the path. Once the MCP server is reachable, URL lookups will return Vercel API errors instead of deployment details; normalize full URLs to their hostname and pass that as the path segment.
Useful? React with 👍 / 👎.
| @@ -0,0 +1,23 @@ | |||
| --- | |||
| 'kimi-code': minor | |||
There was a problem hiding this comment.
Target the scoped CLI package in the changeset
This changeset names kimi-code, but the publishable CLI workspace is @moonshot-ai/kimi-code (as used by the existing changesets and apps/kimi-code/package.json). With this unscoped name, Changesets will not apply the release note/bump to the CLI package and may fail during versioning, so the plugin/user-visible todo change will be omitted from the intended release.
Useful? React with 👍 / 👎.
Summary
Introduces kimi-vercel, an official MCP plugin for managing Vercel projects and deployments.
Changes
Provided Tools
Setup
Set VERCEL_TOKEN environment variable with a Vercel personal access token.
Testing